package Homework;

import java.io.File;
import java.io.IOException;
import java.util.Scanner;
public class T5 {
    public static void main(String[] args) throws IOException {
        Scanner scan = new Scanner(System.in);
        System.out.println("请输入你要创建的文件名：");
        File file = new File("./"+scan.next());
        if (file.exists()){
            System.out.println("对不起文件名重复!");
            System.out.println("请您更换文件名");
        }else {
            file.createNewFile();
            System.out.println("文件创建成功!");
        }
    }
}
